import { IsString } from "class-validator";
import { BaseEntity } from "../BaseEntity";
import { Model } from "sequelize";

export default class CompanyInfoEntity extends BaseEntity {
  id?: number;
  
  @IsString()
  public name: string;

  @IsString()
  public content: string;

  public static transform(plainObject: object): CompanyInfoEntity {
    return super.baseTransform(CompanyInfoEntity, plainObject);
  }
}

export interface ICompanyInfoModel extends Model<CompanyInfoEntity> {}

/**
 * 导入的字段映射对象
 */
export const importFieldMap: Omit<CompanyInfoEntity, "validateThis"> = {
  name: "name",content: "content"
};
